<?php
/*
 * @Date: 2025-08-02 02:05:31
 * @LastEditors: 贾二小 erxiao.jia@outlook.com
 * @LastEditTime: 2025-08-09 01:17:24
 * @FilePath: /admin-api/database/seeders/MenuSeeder.php
 */

namespace Database\Seeders;

use App\Models\Menu;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class MenuSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $data = [
            ['parent_id' => 0, 'label' => '控制台', 'icon' => 'carbon:home', 'router_name' => 'admin.home'],
            ['parent_id' => 0, 'label' => '系统设置', 'icon' => 'carbon:ibm-engineering-systems-design-rhapsody', 'router_name' => null],
            ['parent_id' => 0, 'label' => '关于', 'icon' => 'carbon:carbon-for-ibm-product', 'router_name' => 'admin.abort'],
            ['parent_id' => 2, 'label' => '用户管理', 'icon' => 'carbon:user-multiple', 'router_name' => 'admin.system.user'],
            ['parent_id' => 2, 'label' => '角色管理', 'icon' => 'carbon:user-role', 'router_name' => 'admin.system.role'],
            ['parent_id' => 2, 'label' => '权限管理', 'icon' => 'carbon:user-online', 'router_name' => 'admin.system.permission'],
            ['parent_id' => 2, 'label' => '菜单管理', 'icon' => 'material-symbols:route', 'router_name' => 'admin.system.menu'],

        ];
        Menu::upsert($data, ['id']);
    }
}
